<?php 
//Luu giu trang thai loc
$v_receive_date_filter = "";
if(isset($_REQUEST['hdn_received_date_filter'])){
	$v_receive_date_filter = $_REQUEST['hdn_received_date_filter'];
} 
$v_recordtype_filter = $_SESSION['onegate_current_recordtype'];
if(isset($_REQUEST['hdn_recordtype_filter'])){
	$v_recordtype_filter = $_REQUEST['hdn_recordtype_filter'];
} 
$v_record_id = 0;
if(isset($_REQUEST['hdn_record_id'])){
	$v_record_id = intval($_REQUEST['hdn_record_id']);
}
$v_record_id_list = "";
if(isset($_REQUEST['hdn_record_id_list'])){
	$v_record_id_list = $_REQUEST['hdn_record_id_list'];
}
$v_result = "&#272;&atilde; nh&#7853;n th&ocirc;ng b&aacute;o thu&#7871; t&#7915; c&#417; quan thu&#7871;";
//echo 'Test slajdf :='.$v_result; exit;
if(_is_sqlserver()){
	//Cap nhat ho so
	$sql = " Exec Onegate_RecordHandoverUpdate_NhanTB_Thue_Tu_Cquan ";
	$sql = $sql . " '" .  $v_record_id_list . "'";
	$sql = $sql . "," . $v_staff_id ;
	$sql = $sql . ",'" . _ddmmyyyy_to_yyyymmdd($v_receive_date_filter) . "'" ;
	$sql = $sql . "," . $_ISA_AUTOMATIC_UPDATE_WORK_LIST;
	$sql = $sql . ",'" . $v_result."'";
	$ado_conn->SetFetchMode(ADODB_FETCH_ASSOC);
	$rs = $ado_conn->GetRow($sql); 
	$v_error = _replace_bad_char(trim($rs['RET_ERROR']));
}
sleep(0);
if (!is_null($v_error) && $v_error<>""){?>
	<script>
		alert("<?php echo $v_error; ?>");
		if (_MODAL_DIALOG_MODE==1){
			window.location = "<?php echo $v_goto_url; ?>";
		}else{
			window.history.back();
		}	
	</script><?php
	exit;
}
?>
<form action="index.php" method="post" name="f_back">
	<input type="hidden" name="fuseaction" value="DISPLAY_ALL_RECORD_NOTIFY_TAX_TU_CQUAN">
	<input type="hidden" name="hdn_record_id" value="<?php echo $v_record_id;?>">
	<input type="hidden" name="hdn_recordtype_filter" value="<?php echo $v_recordtype_filter; ?>">
	<input type="hidden" name="hdn_received_date_filter" value="<?php echo $v_receive_date_filter; ?>">
	<input type="hidden" name="hdn_current_item_id" value="<?php echo $v_record_id;?>">
</form>
<Script language="javascript">
	document.forms(0).submit();
</Script>